//代理后端地址
let proxyObj = {}

proxyObj['/'] = {
    //websocket
    ws: false,
    //代理目标地址
    target: 'http://127.0.0.1:18080',
    //发送请求头host被设置成target
    changeOrigin: true,
    //可以在这里重写路径 比如加后端项目前缀路径
    pathReWrite: {
        '^/': '/'
    }

}


module.exports = {
    devServer: {
        host: 'localhost',
        port: 8080,
        proxy: proxyObj
    }
}